#ifndef HexFilter_First
#ifdef __GNUG__
#pragma interface
#endif
#define HexFilter_First

#include "StreamBuf.h"

class Stream;

//---- HexFilter ---------------------------------------------------------------

class HexFilter : public StreamBuf {
protected:
	int col;
	char *endtoken, *pos;
	bool eof;
protected:
	HexFilter(char *et= 0);
	~HexFilter();
};

//---- HexEncoder --------------------------------------------------------------

class HexEncoder : public HexFilter {
public:
	HexEncoder(char *et= 0);
	int Overflow(u_char *bp, int size);
	void Close();
};

//---- HexDecoder --------------------------------------------------------------

class HexDecoder : public HexFilter {
public:
	HexDecoder(char *et= 0);
	int Underflow(u_char *bp, int size);
};

#endif

